package cn.tedu.carehome.foundation.pojo.dto;


import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * 该类对象接收新建餐品传过来的对象
 * @author 袁田
 */
@Data
public class FoodAddNewDTO {
    /**
     * 餐品名称
     */
    @ApiModelProperty(value = "餐品名称", required = true)
    @NotNull(message = "添加餐品失败，必须提交餐品名称！")
    @Length(max = 50,message = "添加餐品失败,餐品名字过长!最长50字")
    private String name;
    /**
     * 餐品价格
     */
    @ApiModelProperty(value = "餐品价格", required = true, example = "12.5")
    @NotNull(message = "添加餐品失败，必须提交餐品价格！")
    private Double price;
    /**
     * 餐品图片的url
     */
    @ApiModelProperty(value = "餐品图片的url")
    private String url;


}
